\documentclass[twoside,a4paper]{article}
\usepackage{geometry}
\geometry{margin=1.5cm, vmargin={0pt,1cm}}
\setlength{\topmargin}{-1cm}
\setlength{\paperheight}{29.7cm}
\setlength{\textheight}{25.3cm}

% useful packages.
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{enumerate}
\usepackage{graphicx}
\usepackage{multicol}
\usepackage{fancyhdr}
\usepackage{layout}
\usepackage{mathrsfs}
\usepackage{pstricks,pst-eps}
\usepackage{tikz}
\pagestyle{empty}


% some common command
\newcommand{\dif}{\mathrm{d}}
\newcommand{\avg}[1]{\left\langle #1 \right\rangle}
\newcommand{\difFrac}[2]{\frac{\dif #1}{\dif #2}}
\newcommand{\pdfFrac}[2]{\frac{\partial #1}{\partial #2}}
\newcommand{\OFL}{\mathrm{OFL}}
\newcommand{\UFL}{\mathrm{UFL}}
\newcommand{\fl}{\mathrm{fl}}
\newcommand{\op}{\odot}
\newcommand{\Eabs}{E_{\mathrm{abs}}}
\newcommand{\Erel}{E_{\mathrm{rel}}}


\begin{document}

\section{Introduction of the files}
File list:

1.Splines.h:genarate a cubic spline

2.data:characteristic points on the boundary of the orginal
figure

3.plot.cpp:genarate a figure depended on the characteristic points and
cubic splines

4.Jordaninclusion.h:determine the inclusion relationship of two simple
disjoint Jordan curves(Without thinking a perfect method, some
situations cannot be compared.)

5.inclusion.cpp:determine the inclusion relationship of curves in the
plotted figure

6.newsplinesdata:the splines of the curves in the plotted
figure(enough points)

7.Makefile:make system(make plot, make inclusion, make document)

8.final\_project.tex:document

9.panda1.png, panda2.png:figures

\section{Find a black-and-white cartoon figure}
See the orginal figure panda1.png.
\begin{figure*}[!ht]
  \centering
  \includegraphics[width=8cm]{panda1.png}
\end{figure*}


\section{Pick points, fit cubic splines and generate a figure}
Firstly, pick characteristic points on the boundary of the orginal
figure by the grabit tool in Matlab and get the coordinates of these
points in the data file. Secondly, write a C++ program to fit cubic
splines using the coordinates of these points and get the cubic
splines of the boundary. Thirdly, we can use these cubic splines to
generate a figure, which is output as panda.m and run it in Matlab.

\section{Produce a poset of splines with the partial order as the
  inclusion of Jordan curves}
In Jordaninclusion.h, for two curves, we use finite and enough points
to replace them, so we can compare the minimum and maximum of the
x-coordinates and y-coordinates to get the inclusion relationship
between two curves. For two simple disjoint curves $\alpha$ and $\beta$, if
$\alpha_{xmin} \ge \beta_{xmin}$, $\alpha_{xmax} \le \beta_{xmax}$, $\alpha_{ymin} \ge
\beta_{ymin}$, $\alpha_{ymax} \le \beta_{ymax}$, $\alpha$ includes $\beta$, and vice versa. From the inclusion.cpp, we can get
the inclusion relationship of the eight curves. However, I can't find a perfect method to compare all
simple disjoint Jordan curves, so there are some problems in the
subroutine, but I can't solve it.

\section{Hasse diagram}
\begin{tikzpicture}
  \node[circle,draw,fill=yellow](n7) at (0,0){$\gamma_7^+$};
  \node[circle,draw,fill=white](n8) at (0,-2) {$\gamma_8^-$};
  \node[circle,draw,fill=yellow](n1) at (-2,-4) {$\gamma_1^+$};
  \node[circle,draw,fill=yellow](n2) at (0,-4) {$\gamma_2^+$};
  \node[circle,draw,fill=yellow](n3) at (2,-4){$\gamma_3^+$};
  \node[circle,draw,fill=white](n5) at (-2,-6){$\gamma_5^-$};
  \node[circle,draw,fill=white](n6) at (0,-6){$\gamma_6^-$};
  \node[circle,draw,fill=white](n4) at (2,-6){$\gamma_4^-$};
  \draw[line width=2,black] (n7)--(n8);
  \draw[line width=2,black] (n8)--(n1);
  \draw[line width=2,black] (n8)--(n2);
  \draw[line width=2,black] (n8)--(n3);
  \draw[line width=2,black] (n1)--(n5);
  \draw[line width=2,black] (n2)--(n6);
  \draw[line width=2,black] (n3)--(n4);
\end{tikzpicture}

\section{Represent the Yin set $\mathcal{Y}$ as a realizable spadjor
  $\mathcal{F}$}
\begin{equation*}
  \mathcal{F} = \bigcup_{n=1}^4\mathcal{J}_n = \{\gamma_7^+,\gamma_8^-,\gamma_1^+,\gamma_2^+,\gamma_3^+,\gamma_5^-,\gamma_6^-,\gamma_4^-\}
\end{equation*}
where $\mathcal{J}_1 = \{\gamma_7^+,\gamma_8^-\},\mathcal{J}_2 = \{\gamma_1^+,\gamma_5^-\},\mathcal{J}_3 = \{\gamma_2^+,\gamma_6^-\},\mathcal{J}_4 = \{\gamma_3^+,\gamma_4^-\}$

\begin{equation*}
  \mathcal{Y} = \rho(\mathcal{F}) = \bigcup_{n=1}^4\bigcap_{\gamma_i\in\mathcal{J}_n}int(\gamma_i)
\end{equation*}

\begin{figure*}[!ht]
  \centering
  \includegraphics[width=14cm]{panda2.png}
\end{figure*}

\end{document}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:
